<template>
  <div class="login-warp">
    <p>当前登录用户: <b style="color: red;">{{ userStore.user.username }}</b></p>
    <pre>
      const userSchema = new Schema({
        userid: {
          type: String,
          default: () => uuidv4(),
        },
        username: String,
        password: String,
        age: Number,
        sex: String,
        phone: Number,
        role: String,
        photo: String,
        createdAt: {
          type: Date,
          default: Date.now,
        },
        updatedAt: {
          type: Date,
          default: Date.now,
        },
      });
    </pre>
  </div>
</template>

<script setup name="home">
import { ref, reactive } from "vue";
import { useUserStore } from "@/stores/user";
const userStore = useUserStore();

console.log(userStore.user.username);
</script>

<style lang="less" scoped>
.login-warp {
  p {
    font-size: 20px;
    padding-bottom: 20px;
  }
}
</style>
